package it.test.java;


import it.test.java.function.Solution5;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

/**
 * @Copyright 纳新智能科技有限公司
 * @Author Liky
 * @Date ${DATE}
 */
public class Main {
    public static void main(String[] args) {
//        int[] qo = new int[]{2, 7, 11, 15};
//        int[] result = Solution.twoSum(qo,9);

//        String a = "LVIII";
//        String b = "IV";
//        Solution3 solution3 = new Solution3();

        int[] aaa = new int[]{9,6,4,2,3,5,7,0,1};
        //Solution4 solution4 = new Solution4();
        Solution5 solution5 = new Solution5();
        System.out.println(solution5.missingNumber(aaa));

        // 创建一个ScriptEngineManager
        ScriptEngineManager manager = new ScriptEngineManager();

        // 获取Lua脚本引擎
        ScriptEngine luaEngine = manager.getEngineByName("lua");

        if (luaEngine == null) {
            System.err.println("Lua script engine not found.");
            System.exit(1);
        }

        try {
            // 定义Lua脚本
            String luaScript = "print('Hello from Lua!')";

            // 执行Lua脚本
            luaEngine.eval(luaScript);
        } catch (ScriptException e) {
            e.printStackTrace();
        }
    }
}